use solutiont3::{Date, 年};

pub fn time_info(time: &str) -> String {
    let date: Date = time.parse().unwrap();
    let nth_week = date.nth_week_since_year_start();
    let days_until_year_end = date.days_until_year_end();
    let 今年春節 = 年::from(date.year).正月初一().to_date();
    let 明年春節 = 年::from(date.year.next()).正月初一().to_date();
    let days_remained = if date < 今年春節 {
        今年春節.days_since(date)
    } else {
        明年春節.days_since(date)
    } - 1;
    dbg!(format!("{nth_week},{days_until_year_end},{days_remained}"))
}
